//
//  ModifyPasswordVC.m
//  SDHuiYuShoping
//
//  Created by luojiao on 2017/6/22.
//  Copyright © 2017年 luojiao. All rights reserved.
//

#import "ModifyPasswordVC.h"

@interface ModifyPasswordVC ()

@end

@implementation ModifyPasswordVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //设置返回按钮
    [self.backButton setImage:[UIImage imageNamed:@"back_white_btn"] forState:UIControlStateNormal];
    [self.backButton setImageEdgeInsets:UIEdgeInsetsMake(0, -50, 0, 0)];
    [self.backButton setTitle:@"返回" forState:UIControlStateNormal];
    [self.backButton setTitleEdgeInsets:UIEdgeInsetsMake(0, -40, 0, 0)];
    
    self.passwordNewBg.image = [UIImage imageNamed:@"input_bg"];
    self.oldPasswordBg.image = [UIImage imageNamed:@"input_bg"];
    self.okPasswordBg.image = [UIImage imageNamed:@"input_bg"];
    
    [self.inputButton setImage:[UIImage imageNamed:@"change_bg"] forState:UIControlStateNormal];
    [self.inputButton setTitle:@"更改" forState:UIControlStateNormal];
    [self.inputButton setTitleEdgeInsets:UIEdgeInsetsMake(0, -260, 0, 0)];
    self.errorLabel.hidden = YES;
    self.titleLabel.text = _titleStr;
    
    self.oldPasswordTextField.delegate = self;
    self.passwordNewTextField.delegate = self;
    self.okPaaswordTextField.delegate = self;

    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - buttonClick

- (IBAction)inputButton:(id)sender {
}


- (IBAction)backButton:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark - UITextFieldDelegate

-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
    [textField resignFirstResponder];
    return YES;
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [self.okPaaswordTextField resignFirstResponder];
    [self.oldPasswordTextField resignFirstResponder];
    [self.passwordNewTextField resignFirstResponder];

    [self.view endEditing:YES];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
